import service from "../index"
import {SubmitDataListType} from "../../viewModel/cluInformation/cluInformationList"
import { submitDataType } from "../../viewModel/cluInformation/addClueInformation"
import baseUrl from "./base"
// 获取线索信息列表数据
export const getClueInformationList = (data:SubmitDataListType) => {
    return service({
        method: "POST",
        data: data,
        url: baseUrl.CUSTOMERINFO_FIND_LEAD_SOURCE_LIST
    })
}

// 获取数据的详情
export const getClueInformDetail = (id:string) => {
    return service({
        method: "GET",
        url: baseUrl.CUSTOMERINFO_SELECT_ONE,
        params: {
            customerId: id
        }
    })
}


// 新增线索
export const addClueInfoData = (data: submitDataType) => {
    return service({
        method: "POST",
        url: baseUrl.LEADINFO_CREATE,
        headers: {
            showTips: true
        },
        data: data,
    })
}
// 编辑客户
export const upDataClueInfoData = (data: submitDataType) => {
    return service({
        method: "POST",
        url: baseUrl.LEADINFO_UPDATA,
        headers: {
            showTips: true
        },
        data: data,
    })
}


// 查询行业下拉数据
export const getIndustry = () => {
    return service({
        url: baseUrl.CUSTOMERINFO_INDUSTRY
    })
}

// 查询状态下拉框
export const getLeadStatus = () => {
    return service({
        url: baseUrl.CUSTOMERINFO_LEAD_STATUS
    })
}

// 线索来源下拉框
export const getLeadSources = () => {
    return service({
        url: baseUrl.CUSTOMERINFO_FIND_LEAD_SOURCES
    })
}